package com.jichaoyun.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jichaoyun.model.entity.ValveAlarm;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ValveAlarmService extends IService<ValveAlarm> {

    /**
     * 报警信息已读
     */
    void MakeAlarmRead(Integer id,Integer userId);

    void MakeAlarmRead(Integer userId);
    /**
     * 查询未读的报警信息
     * @return
     */
    List<Map<String,Object>> pollingDb(Integer userId);

    /**
     * 分页获取阀门报警信息
     * @return
     */
    IPage<ValveAlarm> getValveAlarm(Integer pageNo, Integer pageSize);

    /**
     * 导出报警信息数据到excel
     * @param response
     * @throws IOException
     */
    void getValveAlarmExcel(HttpServletResponse response) throws IOException;
}
